Note

The video above is from an older version of the course. You might find it helpful to watch it as an example of prototyping a workspace, but you don't have to follow along. See the Exercise below for details.

Learning Objectives

After completing this lesson, you’ll be able to: 

Resources

Reading and Writing Workflows

Many users begin a workspace by adding a single reader and writer. However, you will quickly find yourself needing to add additional readers, writers, or feature types. Additionally, FME can read/write data using:

Multiple Readers and Writers

An FME workspace is not limited to any particular number of readers or writers; readers and writers can be added to a workspace at any time, any number of formats can be used, and there does not need to be an equal number of readers and writers.

For example, the Navigator window below shows this workspace contains two readers and three writers, each with different formats.

Viewing multiple readers and writers in the Navigator

Note

It's important to note that readers and writers don’t appear as objects on the Workbench canvas. Their feature types do, but readers and writers don't.

Instead, they are represented by entries in the Navigator window, as in the above screenshot.

Adding Readers and Writers

Additional readers or writers are added to a translation using the Quick Add menu:

Adding a reader using the Quick Add menu

...Or by selecting Readers > Add Reader (Writers > Add Writer) from the menu bar:

Adding a reader or writer using the menu

...Or for readers, by clicking and dragging a file onto the canvas:

All these actions open a dialog, similar to the Generate Workspace dialog, in which the parameters for the new reader or writer can be defined:

Add Writer dialog

If you use Quick Add or the click-and-drag methods, the Add Reader dialog will automatically fill in the Format parameter. Note that FME will guess the Format based on the file ending when clicking and dragging, so make sure to double-check it. Some reader formats use the same file ending, e.g., GeoJSON and JSON can both use the .json file ending.

You can add as many readers and writers as you require in this way.

Deleting a Reader or Writer

If you no longer need a reader or writer, then you can delete it using the menu bar:

Removing a reader or writer using the menu

Alternatively, it's possible to right-click a reader/writer in the Navigator window and choose the Delete option.

Updating a Reader or Writer

Readers and writers can be updated so that older workspaces have the speed and functionality available in a newer version of FME. You can update a reader/writer by right-clicking the reader/writer in the Navigator window and choosing the Update option:

Updating a reader from the Navigator

This tool provides the option to update the reader or update the list of feature types being read. This way, the workspace can be updated if the source data changes. Another way to update feature types is Reader > Update Feature Types on the menu bar.

Note

Do you want to always read all the feature types in a dataset, even if it changes? You can merge feature types in this case. 

Learn more in Define Schema Dynamically from Incoming Datasets.

Importing Feature Types

The Import Feature Types function adds feature types to an existing dataset by importing the schema from any dataset.

The log will display processing information and the feature types will be added to the selected dataset.

Updating Feature Types

If the structure of the data changes in your workspace (for example, the schema changes or an attribute type changes) you will usually want to keep your workspace up-to-date. This is a particularly useful feature if you are working with databases, or if you are sharing data within a workgroup.

Select Readers > Update Feature Types or Writers > Update Feature Types.

Deleting Feature Types

You can delete feature types by right-clicking them on the Canvas and selecting Delete.

If you delete the last feature type belonging to a reader or writer, FME will ask if you also wish to delete the reader or writer. We recommend doing so unless you plan to add feature types later.

Exercise

Frank

Frank is working on a workspace that reads from the community mapping geodatabase and writes to GML. He needs to make some updates before republishing it to FME Flow to power a self-serve Flow App.

Here are the changes he needs to make:

  1. He's been asked to add support for several new feature types that have been added to the community mapping geodatabase since he created the workspace:
    1. FoodVendors
    2. TransitStations
    3. Parks
  2. He's been asked to add support for writing the parks data to SQLite.

Let's help him out.

1) Open Starting Workspace

Frank opens his starting workspace using FME Workbench (2025.0.1 or later). 

It's very basic right now; it just reads and writes from the CommunityCentres feature class in the geodatabase:

Starting workspace

2) Import Reader Feature Types

First, Frank will add the new reader feature types.

Note

It's a good idea to add the reader feature types first, especially if you plan to duplicate them on one or more writers. Then you can quickly use their schema when adding the new writer feature types.

He clicks Readers > Import Feature Types:

Readers > Import Feature Types

Since there is only one reader in the workspace, FME automatically fills in the required information in the Import Reader Feature Types dialog:

Import Reader Feature Types dialog

He confirms it is pointing to the CommunityMapping GDB (C:\FMEData\Data\CommunityMapping\CommunityMap.gdb) and clicks OK.

Next, he is prompted to choose the feature types to import. He selects the three new ones requried in this workspace: FoodVendors, Parks, and TransitStations:

Selecting feature types

He clicks OK to import the new reader feature types.

Note

At this stage, he could also re-import CommunityCentres if there were schema changes he wanted to bring into the workspace. But that's not required this time.

The new feature types appear on the canvas and he places them under the CommunityCentres reader feature type:

New reader feature types

3) Add Parks SQLite Writer

Next, Frank wants to add the SQLite writer.

He uses Writers > Add Writer and sets the Format to SQLite and the dataset to C:\FMEData\Output\Training\Parks.sqlite.

Then he chooses Copy from Reader... for the Table Definition so he can copy the schema from the Parks reader feature type:

Adding SQLite writer

He clicks OK.

He selects Parks as the reader feature type to copy:

Selecting Parks reader feature type to copy

He clicks OK.

The Parks writer feature type is added to the Canvas. He moves the Parks reader feature type to the bottom of its bookmark and connects it to the writer:

Parks writer feature type added

4) Add Writer Feature Types

Now he'd like to add the new feature types to the existing GML writer.

If these layers already existed in the GML file, he could use Writers > Import Feature Types, but because he'll be creating them with this workspace, he has to use Writers > Add Feature Type instead:

Writers > Add Feature Type...

He clicks it and names the first one FoodVendors:

Adding FoodVendors

He clicks OK.

He repeats the steps to add the TransitStations and Parks writer feature types.

He connects the new feature types to their corresponding writer feature types:

Feature types all connected

Great! His workspace has the correct feature types now.

Next, he'll have a look at configuring the reader and writer parameters.